//2009/09/10 05:58:54
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class TheBlackJackDivTwo
{
public:
    int score(vector <string> cards)
    {
        int total = 0;
        for (int i=0; i<cards.size(); i++)
        {
            if (cards[i][0] == 'T' ||cards[i][0] == 'J' ||cards[i][0] == 'Q' ||cards[i][0] == 'K')
                total += 10;
            else if (cards[i][0] == 'A') total += 11;
            else total += cards[i][0] - '0';
        }
        return total;
    }
};
